﻿<!--#include file="h.asp"--><%
'
'	七色虎建站系统
'	最新资源页面
'	2012.4.5

Sub main
	Dim id,rs,sql,count,pagecount,page,i,pagesize,pagenum,a,body_
	body_ = ""
	pagesize=numList
	page=getN("page",1)
	a=getD("type",0)
	hu.title = "今日更新资源"
	body_ = checkMsg()'信息
	body_ = body_ & "[div=nav]-" & hu.url("?aid=index", "首页") & "-"
	If a=0 Then
		body_ = body_ & "今日文章-"& hu.url("new.asp?type=1", "帖子")&"[/div]"
		sql = "select title,id from 74hu_article where (hu_date>#"&time_date&"#) and classid<>0 order by id desc"
		Set rs = Server.CreateObject("ADODB.Recordset")
		rs.open sql, hu.db, 1, 1
		If Not rs.eof Then
			count = rs.recordcount
			body_ = body_ & "今日新增文章"&count&"篇<br/>"
			pagecount=(count+pagesize-1)\pagesize
			if page>pagecount then page=pagecount
			pagenum=pagesize*(page-1)*1
			rs.move(pagenum)
			For i=1 To PageSize
				If rs.eof Then Exit For
					body_ = body_ & ""&(pagenum+i)&"." & hu.url("article.asp?id="&rs("id"), nowml(rs("title"))) &"<br/>"
				rs.movenext
			Next
			body_ = body_ & showPage("new.asp", "", page, pagecount)
		Else
			body_ = body_ & "今日没有文章更新<br/>"
		End If
	Else
		body_ = body_ & "今日帖子-" & hu.url("new.asp", "文章") &"[/div]"
		sql = "select title,id from 74hu_topic where (savetime>#"&time_date&"#) order by id desc"
		Set rs = Server.CreateObject("ADODB.Recordset")
		rs.open sql, hu.db, 1, 1
		If Not rs.eof Then
			count = rs.recordcount
			body_ = body_ & "今日新增帖子"&count&"篇<br/>"
			pagecount=(count+pagesize-1)\pagesize
			if page>pagecount then page=pagecount
			pagenum=pagesize*(page-1)*1
			rs.move(pagenum)
			For i=1 To PageSize
				If rs.eof Then Exit For
					body_ = body_ & ""&(pagenum+i)&"." & hu.url("bbs_posts.asp?id="&rs("id"), noubb(rs("title"))) &"<br/>"
				rs.movenext
			Next
			body_ = body_ & showPage("new.asp", "type:"&a, page, pagecount)
		Else
			body_ = body_ & "今日没有帖子更新<br/>"
		End If
	End If
	rs.close
	Set rs=Nothing
	hu.body = comUbb(body_)
End Sub

%>